<extend name="Layout:layout_list" />
<block name="body_content_block">
    <table id="main_grid" class="easyui-datagrid" data-url="{:AddonU('WorkDay/get_workday_list_json')}"></table>
    <div id="tb" style="padding:2px 5px;">
        <div style="margin-bottom: 5px; border-bottom:solid 1px #dddddd;">
            <if condition="equal_permission_name('编辑工作日',$loginData['role_id'])">
                <a href="{:AddonU('WorkDay/item_edit','id=varid')}" class="easyui-linkbutton lnk_grid_edit" iconCls="icon-edit" plain="true">编辑</a>
            </if>            
            <a href="{:AddonU('WorkDay/workday_export')}" class="easyui-linkbutton" iconCls="icon-save" plain="true">导出</a>
        </div>
    </div>
</block>
<block name="body_after_block">
    <script type="text/javascript">
        // 页面初始化
        var curd_grid = CurdGrid.newInstance();
        curd_grid.config({
            title: '工作日管理',
            toolbar: '#tb',
            columns: [[
                    {field: 'ck', checkbox: true},
                    {title: "租户ID", field: "siteIDText", sortable: true},
                    {title: "工作日", field: "weekday", sortable: true},
                    {title: "临时工作日", field: "tempWorkDays", sortable: true},
                    {title: "临时休息日", field: "tempHolidays", sortable: true},
                    {title: "编号", field: "id", hidden: true},
                ]],
        });
        curd_grid.init();
    </script>
</block>